package com.lap.component.gateway.controller;

import com.lap.component.gateway.shared.GatewayError;
import com.lap.framework.common.dto.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 网关熔断
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@RestController
@RequestMapping("fallback")
public class FallbackController {

  @GetMapping
  public Mono<Result<String>> fallback() {
    return Mono.just(Result.fail(GatewayError.FALLBACK));
  }
}
